import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;


import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Statement;
import com.hp.hpl.jena.rdf.model.StmtIterator;
import com.hp.hpl.jena.util.ModelLoader;

public class TestModelAddModel {
	public static void main(String[] args) throws FileNotFoundException{
//		FileInputStream testInput= new FileInputStream(new File("smartspace.owl"));
//		@SuppressWarnings("deprecation")
//		Model basicModel = ModelLoader.loadModel(testInput.toString());
		
		OntModel basicModel = ModelFactory.createOntologyModel();
//		m = FileManager.get().loadModel("smartspace.owl");
		File infFile = new File("smartspace.owl");
		 //infOntModel.read(infModel.toString());
		basicModel.read(new FileInputStream(infFile), "");
		
		OntModel basicModel2 = ModelFactory.createOntologyModel();
//		m = FileManager.get().loadModel("smartspace.owl");
		File infFile2 = new File("smartspace1.owl");
		 //infOntModel.read(infModel.toString());
		basicModel.read(new FileInputStream(infFile2), "");
		basicModel.add(basicModel2);
		
		
		FileOutputStream fout = new FileOutputStream("testResults2.owl");
		basicModel.write(fout);
		basicModel.close();
	}

}
